from header_factions import *

####################################################################################################################
#  Each faction record contains the following fields:
#  1) Faction id: used for referencing factions in other files.
#     The prefix fac_ is automatically added before each faction id.
#  2) Faction name.
#  3) Faction flags. See header_factions.py for a list of available flags
#  4) Faction coherence. Relation between members of this faction.
#  5) Relations. This is a list of relation records.
#     Each relation record is a tuple that contains the following fields:
#    5.1) Faction. Which other faction this relation is referring to
#    5.2) Value: Relation value between the two factions.
#         Values range between -1 and 1.
#  6) Ranks
####################################################################################################################

factions = [
  ("player_faction","Player Faction",0, 0.9, [], []),
  ("commoners","Commoners",0, 0.1,[("player_faction",0.1)], []),
  ("outlaws","Outlaws", max_player_rating(-30), 0.5,[("commoners",-0.6),("player_faction",-0.3)], []),
# Factions before this point are hardwired into the game end their order should not be changed.

  ("neutral","Neutral",0, 0.1,[("player_faction",0.0)], []),
  ("innocents","Innocents", 0, 0.5,[("outlaws",-0.05)], []),

  ("dark_knights","Dark Knights", 0, 0.5,[("innocents",-0.9),("player_faction",-0.4)], []),
  ("swadian_caravans","Swadian Caravans", 0, 0.5,[("outlaws",-0.8), ("dark_knights",-0.2)], []),
  ("vaegir_caravans","Vaegir Caravans", 0, 0.5,[("outlaws",-0.8), ("dark_knights",-0.2)], []),

  ("swadians","Swadians", 0, 0.5,[("outlaws",-0.05),("vaegir_caravans",-0.2), ("dark_knights",-0.05)], ["outsider","sergeant","squire","knight","master knight"]),
  ("vaegirs","Vaegirs", 0, 0.5,[("outlaws",-0.05),("swadians",-0.6),("swadian_caravans",-0.2), ("dark_knights",-0.05)], ["outsider","sergeant","squire","knight","master knight"]),


  ("khergits","Khergits", 0, 0.5,[("player_faction",0.0)], ["horseless","cozack","bahadur","noker","noyan"]),
  ("black_khergits","Black Khergits", 0, 0.5,[("player_faction",-0.3),("vaegirs",-0.02),("swadians",-0.02),("vaegir_caravans",-0.05),("swadian_caravans",-0.05)], []),

  ("rebel_peasants","Rebel Peasants", 0, 0.5,[("vaegirs",-0.5),("player_faction",0.0)], []),

  ("inquisition","Inquisition", 0, 0.5,[("player_faction",-0.3)], []),
  ("manhunters","Manhunters", 0, 0.5,[("outlaws",-0.6),("player_faction",0.1)], []),
  ("swadian_deserters","Swadian Deserters", 0, 0.5,[("manhunters",-0.6),("player_faction",-0.2),("swadian_caravans",-0.05),("swadians",-0.02)], []),
  ("vaegir_deserters","Vaegir Deserters", 0, 0.5,[("manhunters",-0.6),("player_faction",-0.2),("vaegir_caravans",-0.05),("vaegirs",-0.02)], []),
  ("mountain_bandits","Mountain Bandits", 0, 0.5,[("commoners",-0.2),("manhunters",-0.6),("player_faction",-0.3),("vaegir_caravans",-0.05),("vaegirs",-0.02)], []),
  ("forest_bandits","Forest Bandits", 0, 0.5,[("commoners",-0.2),("manhunters",-0.6),("player_faction",-0.3),("vaegir_caravans",-0.05),("vaegirs",-0.02)], []),
  
  ("antler_knights","Antler Knights", 0, 0.5,[("khergits",-0.1),("player_faction",0.1)], []),
  ("tagars","Tagars", 0, 0.5,[("outlaws",-0.1),("antler_knights",-0.7),("player_faction",0.1)], []),
  ("ghouls","Ghouls", max_player_rating(-30), 0.5,[("commoners",-0.7),("player_faction",-0.5)], []),
  ("undeads","Undeads", max_player_rating(-30), 0.5,[("commoners",-0.7),("player_faction",-0.5)], []),
  ("slavers","Slavers", 0, 0.1, [], []),
]
